home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Source Code
/
C++
/
Applications
/
PICSee Dust 1.01
/
Quaternary Source
/
Class_ProgressBar.h
< prev
next >
Wrap
Text File
|
1995-11-13
|
1KB
|
42 lines
#ifndef CLASS_PROGRESSBAR_H_
#define CLASS_PROGRESSBAR_H_
typedef class ProgressBar {
public:
// "B&W" version
ProgressBar(Rect *theBounds, short max, short cur, GrafPtr owner);
// Color version
ProgressBar(Rect *theBounds, short max, short cur, GrafPtr owner,
RGBColor *fill, RGBColor *bkgnd);
virtual void Update(); // Draw without incrementing
virtual void Increment(); // Increment & then draw
virtual void IncrementBy(short stepValue); // Increment by adding stepValue, then draw
virtual void IncrementTo(short newCurVal); // Increment to newCurVal & then draw
virtual void SetStep(short step) { stepVal = step; }
virtual void SetFillColor(RGBColor *newColor) { fillColor = *newColor; }
virtual void SetBkgndColor(RGBColor *newColor) { bkgndColor = *newColor; }
virtual void SetSmoothUpdate(Boolean smooth) { smoothProgress = smooth; }
virtual Boolean IsDone() { return(curVal >= maxVal); }
protected:
GrafPtr ownerPort;
Rect bkgndRect, fillRect, frameRect;
short maxVal;
short curVal;
short stepVal; // Defaults to 1.
Boolean smoothProgress; // Fill up every pixel or just jump to current value?
// Default to true.
Boolean setupYet;
Boolean useFillColor; // Default to false (if not specified)
Boolean useBkgndColor; // Ditto
RGBColor fillColor;
RGBColor bkgndColor;
virtual void Draw();
} *ProgressBarPtr, **ProgressBarHdl;
#endif // CLASS_PROGRESSBAR_H_